package org.esky.reflect.entity;

import java.io.Serializable;

/**
 * @author Jack.Xu
 * @ClassName: User
 * @Description: TODO
 * @author: Jack.Xu
 * @date: 2013年10月18日 下午1:53:20
 */
public class User implements Serializable{
	/**
	 * @fieldName: serialVersionUID
	 * @fieldType: long
	 * @Description: TODO
	 */
	private static final long serialVersionUID = -6392229690348979808L;
	// private成员变量：使用传统的类实例调用方式，只能在本类中访问  
	private String name;
	private Integer age;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	
	// 默认构造函数
	public User() {
	}
	
	// 带参构造函数  
	public User(String name,Integer age) {
		this.name = name;
		this.age = age;
	}
	
	public void sayName(){
		System.out.println("my name is " + name);
	}
	
	// protected方法：使用传统的类实例调用方式，只能在子类和本包中访问  
	protected void sayHello() {
		System.out.println("hello");
	}
	
	public String toString() {
		return "name = " + name + "\t age = " + age;
	}
}
